<template>
  <div class="container">
    <!-- Sidebar Navigation -->
    <div class="sidebar">
      <div class="logo">
        <i class="fas fa-brain"></i>
        <h1>DeepAI 平台</h1>
      </div>
      <ul class="nav-links">
        <li><i class="fas fa-home"></i> 仪表盘</li>
        <li><i class="fas fa-comments"></i> AI聊天</li>
        <li><i class="fas fa-code"></i> 代码修正</li>
        <li class="active"><i class="fas fa-robot"></i> 自动化测试</li>
        <li><i class="fas fa-microphone-alt"></i> 音频识别</li>
        <li><i class="fas fa-users"></i> 会议总结</li>
        <li><i class="fas fa-tasks"></i> 项目管理</li>
        <li><i class="fas fa-plug"></i> MCP集成</li>
      </ul>
    </div>
    
    <!-- Main Content Area -->
    <div class="main-content">
      <router-view />
    </div>
  </div>
</template>

<script>
export default {
  name: 'App'
}
</script>

<style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Roboto', sans-serif;
        }
        
        :root {
            --primary: #61dafb;
            --secondary: #00c9ff;
            --success: #92fe9d;
            --warning: #ff9800;
            --danger: #ff6b6b;
            --dark: #1e1e2e;
            --darker: #161622;
            --light: #f5f7fa;
            --text: #f0f0f0;
            --text-secondary: #b0b0c0;
        }

        body {
            background: linear-gradient(135deg, #1a2a6c, #2c3e50);
            color: var(--text);
            line-height: 1.6;
            min-height: 100vh;
            overflow-x: hidden;
        }

        .container {
            display: flex;
            min-height: 100vh;
        }

        header {
            text-align: center;
            padding: 30px 0;
            margin-bottom: 30px;
        }
        
        h1 {
            font-size: 1.8rem;
            margin-bottom: 10px;
            background: linear-gradient(90deg, #00c9ff, #92fe9d);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
        
        /* 侧边栏样式 */
        .sidebar {
            width: 260px;
            background: rgba(30, 30, 46, 0.9);
            backdrop-filter: blur(10px);
            color: var(--text);
            padding: 20px 0;
            transition: all 0.3s ease;
            border-right: 1px solid rgba(255, 255, 255, 0.1);
            z-index: 100;
        }

        .logo {
            display: flex;
            align-items: center;
            padding: 0 20px 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .logo h1 {
            font-size: 1.5rem;
            margin-left: 10px;
            font-weight: 600;
            background: linear-gradient(90deg, var(--primary), var(--success));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .logo i {
            font-size: 2rem;
            color: var(--primary);
        }

        .nav-links {
            list-style: none;
            margin-top: 20px;
        }

        .nav-links li {
            padding: 12px 20px;
            display: flex;
            align-items: center;
            cursor: pointer;
            transition: all 0.3s;
            border-left: 3px solid transparent;
        }

        .nav-links li:hover {
            background: rgba(97, 218, 251, 0.1);
        }

        .nav-links li.active {
            background: rgba(97, 218, 251, 0.15);
            border-left: 3px solid var(--primary);
        }

        .nav-links i {
            margin-right: 15px;
            width: 20px;
            text-align: center;
            color: var(--primary);
        }

        /* 主内容区样式 */
        .main-content {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            background: rgba(22, 22, 34, 0.6);
            position: relative;
        }

        .page {
            display: none;
            animation: fadeIn 0.5s ease;
        }

        .page.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .header h2 {
            font-weight: 600;
            background: linear-gradient(90deg, var(--primary), var(--success));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            font-size: 1.8rem;
        }

        .search-bar {
            display: flex;
            width: 300px;
        }

        .search-bar input {
            flex: 1;
            padding: 12px 15px;
            border: 1px solid rgba(97, 218, 251, 0.3);
            border-radius: 4px 0 0 4px;
            outline: none;
            background: rgba(30, 30, 46, 0.6);
            color: var(--text);
            font-family: 'Source Code Pro', monospace;
        }

        .search-bar input::placeholder {
            color: var(--text-secondary);
        }

        .search-bar button {
            background: linear-gradient(90deg, var(--secondary), var(--primary));
            color: #1a2a6c;
            border: none;
            padding: 12px 15px;
            border-radius: 0 4px 4px 0;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s;
        }

        .search-bar button:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }

        /* 卡片布局 */
        .card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 25px;
            margin-bottom: 30px;
        }

        .card {
            background: rgba(30, 30, 46, 0.8);
            border-radius: 15px;
            overflow: hidden;
            transition: transform 0.3s;
            height: 100%;
            display: flex;
            flex-direction: column;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
        }

        .card-header {
            padding: 15px 20px;
            background: rgba(22, 22, 34, 0.8);
            color: var(--text);
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .card-content {
            padding: 20px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .card h2 {
            font-size: 1.5rem;
            margin-bottom: 15px;
            color: #61dafb;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .card h2 i {
            background: rgba(97, 218, 251, 0.2);
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .card p {
            margin-bottom: 15px;
            opacity: 0.85;
        }
        
        .card ul {
            padding-left: 20px;
            margin-bottom: 15px;
        }
        
        .card li {
            margin-bottom: 8px;
            position: relative;
        }
        
        .card li:before {
            content: "•";
            color: #61dafb;
            position: absolute;
            left: -15px;
        }

        .feature-icon {
            font-size: 2.5rem;
            color: var(--primary);
            margin-bottom: 15px;
            text-align: center;
        }

        .feature-description {
            margin-bottom: 20px;
            flex: 1;
            color: var(--text-secondary);
            line-height: 1.7;
        }

        .feature-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 20px;
        }

        .tag {
            background: rgba(97, 218, 251, 0.15);
            color: var(--primary);
            padding: 6px 14px;
            border-radius: 30px;
            font-size: 0.85rem;
            font-weight: 500;
        }

        .feature-actions {
            display: flex;
            gap: 10px;
        }

        .action-btn {
            flex: 1;
            padding: 12px;
            border-radius: 8px;
            border: none;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 0.9rem;
        }

        .action-btn.primary {
            background: linear-gradient(90deg, var(--secondary), var(--primary));
            color: #1a2a6c;
        }

        .action-btn.secondary {
            background: transparent;
            color: var(--primary);
            border: 1px solid rgba(97, 218, 251, 0.5);
        }

        .action-btn:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }

        /* 控制台预览 */
        .console-preview {
            background: #1e1e1e;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            padding: 20px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .console-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid #444;
        }

        .console-title {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--success);
        }

        .console-actions {
            display: flex;
            gap: 10px;
        }

        .console-actions button {
            background: linear-gradient(90deg, var(--secondary), var(--primary));
            color: #1a2a6c;
            border: none;
            padding: 8px 15px;
            border-radius: 4px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
        }

        .console-actions button:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }

        .console-content {
            background: #1a1a2a;
            border-radius: 8px;
            padding: 20px;
            font-family: 'Source Code Pro', monospace;
            height: 200px;
            overflow-y: auto;
            border: 1px solid rgba(97, 218, 251, 0.3);
        }

        .console-line {
            margin-bottom: 12px;
            display: flex;
            gap: 10px;
        }

        .prompt {
            color: var(--success);
            min-width: 30px;
        }

        .response {
            color: var(--primary);
        }

        /* 功能状态指示器 */
        .status-indicator {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 15px;
            font-size: 0.95rem;
            padding: 10px 15px;
            background: rgba(30, 30, 46, 0.5);
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .status-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            display: inline-block;
        }

        .status-dot.active {
            background: var(--success);
            box-shadow: 0 0 8px var(--success);
        }

        .status-dot.inactive {
            background: var(--danger);
            box-shadow: 0 0 8px var(--danger);
        }

        /* Playwright 页面样式 */
        .playwright-page .card-grid {
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        }

        .playwright-page .subtitle {
            font-size: 1.1rem;
            opacity: 0.9;
            max-width: 700px;
            margin: 0 auto 30px;
            text-align: center;
        }

        .playwright-page .btn-container {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin: 30px 0;
        }

        .playwright-page .btn {
            background: linear-gradient(90deg, var(--secondary), var(--primary));
            color: #1a2a6c;
            border: none;
            padding: 12px 30px;
            font-size: 1.1rem;
            font-weight: 600;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .playwright-page .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 7px 20px rgba(0,0,0,0.3);
        }

        .playwright-page .btn:active {
            transform: translateY(1px);
        }

        .playwright-page .btn-outline {
            background: transparent;
            border: 2px solid var(--primary);
            color: var(--primary);
        }

        .playwright-page .progress-container {
            background: rgba(30, 30, 46, 0.8);
            border-radius: 15px;
            padding: 20px;
            margin: 30px 0;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }

        .playwright-page .progress-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 15px;
        }

        .playwright-page .progress-bar {
            height: 20px;
            background: #333;
            border-radius: 10px;
            overflow: hidden;
        }

        .playwright-page .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--secondary), var(--primary));
            width: 0%;
            transition: width 0.5s ease;
            border-radius: 10px;
        }

        .playwright-page .test-results {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-top: 30px;
        }

        .playwright-page .test-case {
            background: rgba(30, 30, 46, 0.8);
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }

        .playwright-page .test-case.passed {
            border-left: 4px solid var(--success);
        }

        .playwright-page .test-case.failed {
            border-left: 4px solid var(--danger);
        }

        .playwright-page .test-case h3 {
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .playwright-page .test-case .status {
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        .playwright-page .passed .status {
            background: rgba(146, 254, 157, 0.2);
            color: var(--success);
        }

        .playwright-page .failed .status {
            background: rgba(255, 107, 107, 0.2);
            color: var(--danger);
        }

        .playwright-page .api-key-container {
            background: rgba(30, 30, 46, 0.8);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 30px;
        }

        .playwright-page .api-key-input {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }

        .playwright-page .api-key-input input {
            flex: 1;
            padding: 12px;
            border-radius: 8px;
            border: 1px solid rgba(97, 218, 251, 0.3);
            background: rgba(30, 30, 46, 0.6);
            color: var(--text);
            font-family: 'Source Code Pro', monospace;
        }

        .playwright-page .console {
            background: #1e1e1e;
            border-radius: 15px;
            padding: 20px;
            margin-top: 30px;
            max-height: 400px;
            overflow-y: auto;
            box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        /* 聊天页面样式 */
        .chat-page {
            display: flex;
            height: calc(100vh - 80px);
            gap: 20px;
        }
        
        .chat-sidebar {
            width: 280px;
            background: rgba(30, 30, 46, 0.8);
            border-radius: 15px;
            padding: 20px;
            border: 1px solid rgba(97, 218, 251, 0.3);
            display: flex;
            flex-direction: column;
            height: 100%;
        }
        
        .chat-sidebar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .new-chat-btn {
            background: linear-gradient(90deg, var(--secondary), var(--primary));
            color: #1a2a6c;
            border: none;
            padding: 10px 15px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s;
        }
        
        .new-chat-btn:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }
        
        .chat-history {
            overflow-y: auto;
            flex: 1;
            padding-right: 5px;
        }
        
        .chat-history::-webkit-scrollbar {
            width: 6px;
        }
        
        .chat-history::-webkit-scrollbar-track {
            background: rgba(22, 22, 34, 0.5);
            border-radius: 10px;
        }
        
        .chat-history::-webkit-scrollbar-thumb {
            background: rgba(97, 218, 251, 0.5);
            border-radius: 10px;
        }
        
        .chat-item {
            padding: 12px 15px;
            border-radius: 8px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s;
            background: rgba(22, 22, 34, 0.5);
            border: 1px solid transparent;
            display: flex;
            align-items: center;
            gap: 10px;
            position: relative;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .chat-item:hover {
            background: rgba(97, 218, 251, 0.1);
        }
        
        .chat-item.active {
            background: rgba(97, 218, 251, 0.15);
            border-color: var(--primary);
        }
        
        .chat-item i {
            color: var(--primary);
        }
        
        .chat-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: rgba(30, 30, 46, 0.8);
            border-radius: 15px;
            border: 1px solid rgba(97, 218, 251, 0.3);
            overflow: hidden;
        }
        
        .chat-messages {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .chat-messages::-webkit-scrollbar {
            width: 8px;
        }
        
        .chat-messages::-webkit-scrollbar-track {
            background: rgba(22, 22, 34, 0.5);
            border-radius: 10px;
        }
        
        .chat-messages::-webkit-scrollbar-thumb {
            background: rgba(97, 218, 251, 0.5);
            border-radius: 10px;
        }
        
        .message {
            max-width: 80%;
            padding: 15px 20px;
            border-radius: 12px;
            line-height: 1.6;
            animation: fadeIn 0.3s ease;
        }
        
        .user-message {
            background: rgba(97, 218, 251, 0.15);
            border: 1px solid rgba(97, 218, 251, 0.3);
            align-self: flex-end;
        }
        
        .ai-message {
            background: rgba(30, 30, 46, 0.8);
            border: 1px solid rgba(255, 255, 255, 0.1);
            align-self: flex-start;
        }
        
        .message-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
            font-weight: 600;
        }
        
        .ai-message .message-header {
            color: var(--primary);
        }
        
        .message-content {
            line-height: 1.7;
        }
        
        .message-content p {
            margin-bottom: 10px;
        }
        
        .message-content code {
            background: rgba(22, 22, 34, 0.8);
            padding: 2px 6px;
            border-radius: 4px;
            font-family: 'Source Code Pro', monospace;
        }
        
        .message-content pre {
            background: rgba(22, 22, 34, 0.8);
            padding: 15px;
            border-radius: 8px;
            overflow-x: auto;
            margin: 15px 0;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .message-content pre code {
            background: transparent;
            padding: 0;
        }
        
        .message-content ul, 
        .message-content ol {
            padding-left: 25px;
            margin: 10px 0;
        }
        
        .chat-input-area {
            padding: 15px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            gap: 10px;
        }
        
        .message-input {
            flex: 1;
            padding: 15px;
            border-radius: 12px;
            border: 1px solid rgba(97, 218, 251, 0.3);
            background: rgba(30, 30, 46, 0.6);
            color: var(--text);
            resize: none;
            min-height: 60px;
            font-family: 'Roboto', sans-serif;
        }
        
        .message-input:focus {
            outline: none;
            border-color: var(--primary);
        }
        
        .send-btn {
            background: linear-gradient(90deg, var(--secondary), var(--primary));
            color: #1a2a6c;
            border: none;
            border-radius: 12px;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s;
            align-self: flex-end;
        }
        
        .send-btn:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }
        
        .chat-actions {
            display: flex;
            justify-content: flex-end;
            padding: 10px 20px;
            gap: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .action-btn {
            background: rgba(30, 30, 46, 0.8);
            color: var(--text);
            border: 1px solid rgba(97, 218, 251, 0.3);
            padding: 8px 15px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s;
        }
        
        .action-btn:hover {
            background: rgba(97, 218, 251, 0.1);
        }
        
        .typing-indicator {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 15px 20px;
            background: rgba(30, 30, 46, 0.8);
            border-radius: 12px;
            margin-top: 10px;
            align-self: flex-start;
            display: none;
        }
        
        .dot {
            width: 8px;
            height: 8px;
            background: var(--primary);
            border-radius: 50%;
            animation: bounce 1.5s infinite;
        }
        
        .dot:nth-child(2) {
            animation-delay: 0.2s;
        }
        
        .dot:nth-child(3) {
            animation-delay: 0.4s;
        }
        
        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-5px); }
        }
        
        .chat-card .feature-icon {
            color: #ff6b6b;
        }
        
        /* 响应式设计 */
        @media (max-width: 900px) {
            .container {
                flex-direction: column;
            }
            
            .sidebar {
                width: 100%;
                height: auto;
                padding: 10px 0;
            }
            
            .logo {
                padding: 10px 20px;
            }
            
            .nav-links {
                display: flex;
                flex-wrap: wrap;
                margin-top: 10px;
            }
            
            .nav-links li {
                flex: 1 1 auto;
                padding: 10px;
                justify-content: center;
            }
            
            .card-grid {
                grid-template-columns: 1fr;
            }
            
            .search-bar {
                width: 200px;
            }
            
            .chat-page {
                flex-direction: column;
                height: auto;
            }
            
            .chat-sidebar {
                width: 100%;
                height: 300px;
            }
        }

        @media (max-width: 600px) {
            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
            
            .search-bar {
                width: 100%;
            }
            
            .console-actions {
                flex-wrap: wrap;
                justify-content: flex-end;
            }
            
            .feature-actions {
                flex-direction: column;
            }
            
            .playwright-page .api-key-input {
                flex-direction: column;
            }
            
            .playwright-page .btn-container {
                flex-direction: column;
            }
            
            .chat-actions {
                flex-wrap: wrap;
                justify-content: center;
            }
            
            .action-btn {
                flex: 1;
                min-width: 120px;
            }
        }
    </style>
